package itdfq.dfq.Structural_Patterns.zuhe;

import java.util.ArrayList;

/**
 * @Author GocChin
 * @Date 2021/4/16 13:36
 * @Blog: itdfq.com
 * @QQ: 909256107
 */
public class Floder extends Open{
    private ArrayList list = new ArrayList();

    public void add(Open open){
        list.add(open);
    }
    public void remove(Open open){
        list.remove(open);
    }

    @Override
    public void open() {
        for(Object object :list){
            ((Open)object).open();
        }
    }
}
